package com.cevent.community.app.system.config;/**
 * Created by Cevent on 2021/9/10.
 */

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

/**
 * @author cevent
 * @description 系统模块
 * @date 2021/9/10 14:40
 * @ComponentScan：扫描包配置
 * @MapperScan：配置mapper扫描包
 */
@SpringBootApplication
@EnableEurekaClient
@MapperScan("com.cevent.community.app.common.mapper")
@ComponentScan("com.cevent.community.app")
public class SystemApplication {
    private static final Logger LOG=LoggerFactory.getLogger(SpringBootApplication.class);

    public static void main(String[] args) {
        SpringApplication application=new SpringApplication(SystemApplication.class);
        Environment environment=application.run(args).getEnvironment();
        LOG.info("系统模块system启动成功，地址\t http://127.0.0.1:{}",environment.getProperty("server.port"));
    }
}
